'use strict';

const softwareCopyrightController = require('../../controllers/softwareCopyright');

module.exports = function (app, router, opts) {
  // 获取软著列表
  app.fs.api.logAttr["GET/softwareCopyright/list"] = {
    name: "获取软著列表",
    visible: false,
  };
  router.get('/softwareCopyright/list', softwareCopyrightController.getSoftwareCopyrightList);
  
  // 导入软著数据
  app.fs.api.logAttr["POST/softwareCopyright/import"] = {
    name: "导入软著数据",
    visible: false,
  };
  router.post('/softwareCopyright/import', softwareCopyrightController.importSoftwareCopyright);
  
  // 创建软著
  app.fs.api.logAttr["POST/softwareCopyright"] = {
    name: "创建软著",
    visible: false,
  };
  router.post('/softwareCopyright', softwareCopyrightController.createSoftwareCopyright);
  
  // 编辑软著信息
  app.fs.api.logAttr["PUT/softwareCopyright/:id"] = {
    name: "编辑软著信息",
    visible: false,
  };    
  router.put('/softwareCopyright/:id', softwareCopyrightController.updateSoftwareCopyright);
  
  // 删除软著
  app.fs.api.logAttr["DELETE/softwareCopyright/:id"] = {
    name: "删除软著",
    visible: false,
  };
  router.delete('/softwareCopyright/:id', softwareCopyrightController.deleteSoftwareCopyright);
  
  // 导出软著数据
  app.fs.api.logAttr["GET/softwareCopyright/export"] = {
    name: "导出软著数据",
    visible: false,
  };
  router.get('/softwareCopyright/export', softwareCopyrightController.exportSoftwareCopyright);
  
  // 获取软著导入模板
  app.fs.api.logAttr["GET/softwareCopyright/template"] = {
    name: "获取软著导入模板",
    visible: false,
  };
  router.get('/softwareCopyright/template', softwareCopyrightController.getSoftwareCopyrightTemplate);
}; 